<template>
    <div>
        <h3>aaa</h3>
        <button @click="go">点击发送</button>
    </div>
</template>
<script>
import Event from '../utils/eventBus'
export default{
    data(){
        return {
            a:'a的数据'
        }
    },
    methods:{
        go(){
            //Event.$emit('a',this.a);
        }
    },
    mounted(){
        Event.$emit('a',this.a);
        Event.$on('b',(v)=>{
            console.log(v);
        })
    }
}
</script>